/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Educacionit
 */
public class Escritor {

    public static void main(String[] args) throws IOException {

        File archOut = new File("salida.txt");
        FileWriter out = null;
        BufferedWriter writer = null;

        try {
            out = new FileWriter(archOut);
            writer = new BufferedWriter(out);
            
            String info = "Uno es lo " +
                    "que hace y no " +
                    "lo que dice " +
                    "ser";

            for (int i = 0; i < info.length(); i++) {
                writer.write(info.charAt(i));
            }
            writer.flush();

        } catch (Exception e) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, e);
            e.printStackTrace();
        } finally {
            writer.close();
            out.close();
        }


    }
}
